import request from '@/utils/request'
// 获取分类
export const getCategoryAPI = id => {
  return request({
    url: '/category',
    params: {
      id
    }
  })
}

// 获取banner
export function getBannerAPI (params = {}) {
  const { distributionSite = '1' } = params
  return request({
    url: '/home/banner',
    params: {
      distributionSite
    }
  })
}

//获取筛选条件
export const getCategoryFilterAPI = id => {
  return request({
    url: '/category/sub/filter',
    params: {
      id
    }
  })
}

//获取导航数据
export const getSubCategoryAPI = data => {
  return request({
    url: '/category/goods',
    method: 'POST',
    data
  })
}
//首页路由跳转
//获取分类路由id
export function getCategoryAPIHead () {
  return request({
    url: '/home/category/head'
  })
}
